<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <style>
        /*盒子水平垂直方向局中的实现方式*/
        .box{
            width: 200px;
            height: 200px;
            background-color: brown;
            position: fixed;
            left: 50%;
            top: 50%; 
            transform: translate(-50% , -50% 
            );
        }
        .box:hover{
           transform: rotate(30deg);
        }
    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>